-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deprecate cirq.SingleQubitGate
#5272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this will break any external code relying on isinstance(gate, SingleQubitGate)
to work for Cirq gates. @tanujkhattar, @maffoo, are we okay with this? I imagine doing this in a backwards-compatible way could be convoluted...and we might not have the cycles left before 1.0 to fit it in.
https://github.com/quantumlib/Cirq/pull/4207/files#diff-ca28027a48663798185c7ace310bbfa90b231d4afa96fafebda9a1d2cb05a322 for an example of how to preserve behavior of e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to go % one docs nit.
cirq-core/cirq/ops/clifford_gate.py
Outdated
def _pad_tableau( | ||
clifford_tableau: qis.CliffordTableau, num_qubits_after_padding: int, axes: List[int] | ||
) -> qis.CliffordTableau: | ||
"""Roughly, this function copies self.tabluea into the "identity" matrix.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.tabluea
-> self.tableau
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Updated the |
Automerge cancelled: A required status check is not present. Missing statuses: ['Build docs', 'Build protos', 'Coverage check', 'Pytest MacOS (3.7)', 'Pytest MacOS (3.8)', 'Pytest MacOS (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage'] |
Automerge cancelled: A required status check is not present. Missing statuses: ['Build docs', 'Build protos', 'Changed files test', 'Coverage check', 'Doc test', 'Format check', 'Lint check', 'Misc check', 'Notebook formatting', 'Pytest MacOS (3.7)', 'Pytest MacOS (3.8)', 'Pytest MacOS (3.9)', 'Pytest Ubuntu (3.7)', 'Pytest Ubuntu (3.8)', 'Pytest Ubuntu (3.9)', 'Pytest Windows (3.7)', 'Pytest Windows (3.8)', 'Pytest Windows (3.9)', 'Type check', 'Typescript lint check', 'Typescript tests', 'Typescript tests coverage'] |
Fixes #4790